#ifndef MD_ATV_H
#define MD_ATV_H

#include <QWidget>
#include <QMessageBox>
//#include <QtTest/QTest>
#include "tcl_mstar_atv_tv.h"
#include "tcl_mtk_atv_tv.h"

namespace Ui {
class Md_atv;
}

class Md_atv : public QWidget
{
    Q_OBJECT
    
public:
      Md_atv(TCL_MSTAR_ATV_TV *, QList<uint> *,QWidget *parent=0);
      Md_atv(TCL_MTK_ATV_TV *, QList<uint> *, QWidget *parent=0);
      Md_atv(TCL_MSTAR_ATV_TV *,QList<uint>*,QMap<uint,uchar>*, QMap<uint,uchar> *,QWidget *parent=0);
      Md_atv(TCL_MTK_ATV_TV *,QList <uint>*,QMap <uint,uchar>*,QMap<uint,uchar> *,QWidget *parent=0);
      ~Md_atv();
      bool Is_Close();
private:
    Ui::Md_atv *ui;
    int solution;//0-mstar_atv,1-mstar_dtv,2-mtk_atv,3-mtk_dtv
    bool is_close;
    QList<QString> ch_data;
    TCL_MSTAR_ATV_TV *ms_atv;
    TCL_MTK_ATV_TV *mt_atv;
    QList<uint> *atv_num;
    QMap<uint,uchar> *dtv_air_num;
    QMap<uint,uchar>*dtv_cable_num;
    int which;
    uint ch_val;
    uint ch_class;
    QList<uint>md_item;


signals:
      void Mstar_Close(TCL_MSTAR_ATV_TV,QList<uint> );
      void Mtk_Close(TCL_MTK_ATV_TV,QList<uint> );

public slots:
    //  void Set_Class_Index(int);
      void Set_Fav_Index(int);
      void Set_Skip_Index(int);
      void Set_Name(QString);
      void Set_Num(QString);
      void Set_Freq(QString);
       void Confirm();
       void Check_Num();
       void Check_Freq();




      //void Close(TCL_MTK_ATV_TV*,TCL_MSTAR_ATV_TV *);
private:
      void My_Init();

};

#endif // MD_ATV_H
